﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class GRZX_WSXY_WGXX : Base
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SetMeta();
        }
    }

    public void SetMeta()
    {
       
        this.SetMeta("违规信息-求学网", "求学网_家教辅导_网上家教辅导_企业培训_个人培训_网上培训", "求学网是一个给您提供网上家教辅导的平台，方便您无论在哪里都能够学习到新的东西");

    }
    protected void Pager_PreRender(object sender, EventArgs e)
    {
        if (lstWDXX.Items.Count == 0)
            PopulateList();
    }
    protected void lstWDXX_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        PopulateList();

    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        PopulateList();
    }
    public void PopulateList()
    {
        Client objClient = Client.GetCurrent();
        if (objClient == null)
            return;
        List<WGXX> listWGXX = WGXX.GetAllInUserIDByConditon(0, 0, txtTimeFrom.Text, txtTimeTo.Text, 0, objClient.ID, 0);
        lstWDXX.DataSource = listWGXX;
        lstWDXX.DataBind();
        lblCount.Text = listWGXX.Where(row => row.AddTime.Month == System.DateTime.Now.Month).ToList().Count.ToString();
    }

}